package com.longchat.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.longchat.domain.award.Award;

public interface AwardJpaRepository extends JpaRepository<Award,Integer> {
	@Query("from Award a where a.hasPrize=false")
	List<Award> findNotHasPrize();
	
	@Query("from Award a where a.activity.id=?1")
	List<Award> findAwardByActivityId(Integer activityId);
	
	
}
